-- GENERATED SPELL FOR [Death Knight Captain] --


function spell0_16145(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(55255,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16145', 609, 1)
end

function spell1_16145(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(55321,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16145', 615, 1)
end

function spell2_16145(pUnit, Event) --@Raise Dead,n/a--
pUnit:FullCastSpellOnTarget(28353,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16145', 1500, 1)
end

function spell3_16145(pUnit, Event) --@Unholy Presence,Self--
pUnit:FullCastSpellOnTarget(55222,pUnit)
pUnit:RegisterEvent('Sorts_16145', 606, 1)
end

function Sorts_16145(pUnit, Event)
local choix_sorts_16145 = math.random(0, 3)
if choix_sorts_16145 == 0 then
pUnit:RegisterEvent('spell0_16145', 1, 1)
end
if choix_sorts_16145 == 1 then
pUnit:RegisterEvent('spell1_16145', 1, 1)
end
if choix_sorts_16145 == 2 then
pUnit:RegisterEvent('spell2_16145', 1, 1)
end
if choix_sorts_16145 == 3 then
pUnit:RegisterEvent('spell3_16145', 1, 1)
end
end

function mob16145_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16145', math.random(1500, 3000), 1)
end

function mob16145_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16145_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16145_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16145, 1, 'mob16145_Action')
RegisterUnitEvent(16145, 2, 'mob16145_Leave')
RegisterUnitEvent(16145, 3, 'mob16145_Kill')
RegisterUnitEvent(16145, 4, 'mob16145_Die')
